<!-- DOWNLOADED FROM WWW.SCRIPTGATES.COM -->
<!DOCTYPE html>
<html>
<head>
<?php $this->load->view('js-css-view') ?>
 
    <script type="text/javascript" src="<?php echo base_url() ?>assets/dashboard/js/tinymce/tinymce.min.js"></script>

<script type="text/javascript">
    jQuery(document).ready(function(){
      
        
        jQuery('#dp1').datepicker({
				format: 'dd-mm-yyyy'
			});   
    	   
        
    });  

</script>


<script type="text/javascript">
tinymce.init({
    selector: "textarea",
    plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste"
    ],
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
</script>



        

</head>

<body>
<div class="mainwrapper">    
    <div class="header">
        <?php $this->load->view('header-view'); ?>
    </div>    
    <div class="leftpanel">
         <?php $this->load->view('menu-view'); ?>
    </div><!-- leftpanel -->
    
    <div class="rightpanel">        
        <ul class="breadcrumbs">
            <li><a href="<?php echo base_url() ?><?php echo $link; ?>"><i class="iconfa-file"></i></a> <span class="separator"></span></li>
            <li><?php echo $current; ?> >> Detail</li>            
        </ul>
        
      
        
        <div class="maincontent">
            <div class="maincontentinner">
                <div class="row-fluid">
                   
                    <div id="dashboard-left" class="span12">
                 
                        <h4 class="widgettitle">Edit Data User</h4>
              
             <form action="<?php echo base_url() ?>user/processUpdate/<?php echo $user['username'] ?>" class="stdform" method="POST" enctype=multipart/form-data>
     <div class="modal-footer">
        <input type="submit" class="btn btn-primary" value="Save Changes"/> 
         <a href="<?php echo base_url() ?>user" class="btn">Cancel</a>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
   <a href = '<?php echo base_url() ?>user/processDelete/<?php echo $user['username'] ?>' class="btn" onClick="return confirm('Anda yakin akan menghapus?')"><span class="icon-trash"></span> Delete</a>
     </div>                    
    <div class="modal-body">
        <p>  <label>Username</label>  <span class="field"><input type="text" placeholder="Username" class="input-xlarge" name="username" value="<?php echo $user['username'] ?>" disabled="disabled"></span> </p>
        <p>  <label>Role</label>  <span class="field">
                <select class="uniformselect" name="id_role">
            <?php foreach($role as $row) { 
                $select = " ";
                if($row['id']==$user['id_role']) {
                $select = "selected='selected'"; }
                ?>                    
                    <option <?php echo $select ?> value="<?php echo $row['id'] ?>"><?php echo $row['role'] ?></option>
            <?php } ?>
                </select>
            
            </span> </p>
        <p>  <label>Password</label>  <span class="field"><input type="password" id="password" class="input-xlarge" name="password" ></span> </p>
        <p>  <label>Confirm Password</label>  <span class="field"><input type="password" class="input-xlarge" name="conf" oninput="check(this)" > &nbsp; &nbsp;
                <sup><font style="color: red">)*Kosongkan jika Password tidak diganti</font></sup></span>
                
        </p>
        
        <p>  <label>Email</label>  <span class="field"><input type="text" placeholder="email" class="input-xlarge" name="email" value="<?php echo $user['email'] ?>" disabled="disabled"></span> </p>
          <p>
                <label>Photo (.jpg/.png) :</label>
                <input type="file" placeholder="Image Image" class="input-xlarge" name="path_image"> &nbsp; &nbsp;
                <sup><font style="color: red">)*Kosongkan jika Photo tidak diganti</font></sup>
				
            </p>
			<label></label>
			<img src="<?php echo base_url()?>../user/<?php echo $user['path_image']?>" style="width:20%; height:20%">
			
    </div>
    
   </form>
                    
                        
                        
                        
                    </div><!--span8-->
              
                </div><!--row-fluid-->
                
            
                <div class="footer">
                    <?php $this->load->view('footer-view'); ?>
                    
                    <script language='javascript' type='text/javascript'>
function check(input) {
    if (input.value != document.getElementById('password').value) {
        input.setCustomValidity('The two passwords must match.');
    } else {
        // input is valid -- reset the error message
        input.setCustomValidity('');
   }
}
</script>
                </div><!--footer-->
                
            </div><!--maincontentinner-->
        </div><!--maincontent-->
        
    </div><!--rightpanel-->
    
</div><!--mainwrapper-->

</body>
</html>